#/bin/bash
#mark
#cd /home/pi/pipaper
cd /home/windnbike/Project/pipaper
. config/config.sh
ps -ef | grep  auto.sh | grep -v 'grep' | awk '{print $2}'| xargs kill -9


[ "$activate" = "true" ] || echo sleep && sleep 1

. config/config.sh
if [ "$updatedate" != "$(date +%Y-%m-%d)" ] || [ "$forceupdate" ]; then
    echo needtostart
fi

if [ "$needtostart" = "true" ]; then
    echo "needtostart $needtostart"
fi
if [ "$activate" = "true" ]
then
    echo "activate $activate"
fi
if [ "$cleanscreen" = "true" ]
then
    echo "cleanscreen $cleanscreen"
fi
if [ "$needtostop" = "true" ]
then
    echo "needtostop $needtostop"
fi
if [ "$needrtcalarm" = "true" ]
then
    echo "needrtcalarm $needrtcalarm"
fi